/**
 * 
 */
package com.rocky.project.model.admin;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import com.rocky.project.model.base.BaseEntity;
/**
 * @hibernate.class table = "t_area" dynamic-insert = "true" dynamic-update = "true"
 */
public class Area extends BaseEntity {

	private static final long serialVersionUID = -7530511442824648517L;
	
	private String name;// 地区名称
	private String code;// 地区代码
	
	private String ZIP;// 邮编
	private String TIP;// 电话区号
	
	private Integer depth=1;//级别
	private Date snapTime ;//归档时间
	
	private Area parent;// 父目录
	private Set children = new HashSet();// 子目录集合
	/**
	 * @hibernate.property column = "c_snaptime" type = "java.util.Date"
	 */
	public Date getSnapTime() {
		return snapTime;
	}
	public void setSnapTime(Date snapTime) {
		this.snapTime = snapTime;
	}
	/**
	 * @hibernate.property column="c_code" type="string"
	 */	
	
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	/**
	 * @hibernate.property column="c_depth" type = "integer" 
	 */	
	public Integer getDepth() {
		return depth;
	}
	public void setDepth(Integer depth) {
		this.depth = depth;
	}
	/**
	 * @hibernate.property column="c_tip" type="string"
	 */
	public String getTIP() {
		return TIP;
	}
	public void setTIP(String tip) {
		TIP = tip;
	}
	/**
	 * @hibernate.property column="c_zip" type="string"
	 */	
	public String getZIP() {
		return ZIP;
	}
	public void setZIP(String zip) {
		ZIP = zip;
	}
	/**
	 * @hibernate.set lazy = "true" readonly = "true" cascade = "all" order-by ="showindex asc" inverse = "true" where="isDeleted='false'"
	 * @hibernate.collection-key column = "c_parent_id"
	 * @hibernate.collection-one-to-many class ="com.rocky.project.model.admin.Area"
	 */
	public Set getChildren() {
		return children;
	}
	public void setChildren(Set children) {
		this.children = children;
	}
	/**
	 * @hibernate.property column="c_name" type="string"
	 */
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	/**
	 * @hibernate.many-to-one column = "c_parent_id" lazy = "true" class ="com.rocky.project.model.admin.Area"
	 */
	public Area getParent() {
		return parent;
	}
	public void setParent(Area parent) {
		this.parent = parent;
	}






}
